/* @(#)GSOperatorDelAction.java   
 *
 * Project: GS
 *
 * Modify Information:
 * =============================================================================
 *   Author       Date       Description
 *   ------------ ---------- ---------------------------------------------------
 *   Jenny Li    2006-3-10     新增
 *
 * Copyright Notice:
 * =============================================================================
 *    Copyright (c) 2001-2006 Beijing HiTRUST Technology Co., Ltd. 1808 Room, 
 *        Science & Technology Building, No. 9 South Street, Zhong Guan Cun, 
 *        Haidian District, Beijing ,100081, China All rights reserved.
 *
 *    This software is the confidential and proprietary information of
 *        Beijing HiTRUST Technology Co., Ltd. ("Confidential Information").
 *        You shall not disclose such Confidential Information and shall use it
 *        only in accordance with the terms of the license agreement you entered
 *        into with HiTRUST.
 *
 * Warning:
 * =============================================================================
 * 
 */
package com.hitrust.gs.action;

import java.util.ArrayList;

import com.hitrust.gs.bean.GSOperatorBean;
import com.hitrust.gs.business.GSOperatorProcessor;
import com.hitrust.gs.business.GSOrgProcessor;
import com.hitrust.gs.dao.GSBalanceCategoryDAO;
import com.hitrust.gs.dao.GSOperatorDAO;
import com.hitrust.gs.lib.GSBaseConstants;
import com.hitrust.gs.service.GSBaseAction;
import com.hitrust.gs.service.GSBaseForm;
import com.hitrust.gs.util.exception.GSException;

/**
 * 
 */
public class GSBalanceCategoryDelAction extends GSBaseAction {

    public String execute(GSBaseForm aForm) throws Exception {
        
        String tBCNo = aForm.getRequest().getParameter("balanceCategoryNo");
        
        GSBalanceCategoryDAO tGSBalanceCategoryDAO = new GSBalanceCategoryDAO();
        boolean tFlag = tGSBalanceCategoryDAO.delete(tBCNo);
        if(tFlag){
            aForm.getRequest().setAttribute("message","结算分类删除成功");
        }else{
            aForm.getRequest().setAttribute("message","结算分类删除失败");
            throw new GSException(GSException.E10062,GSException.E10062_MSG);
        }
        aForm.getRequest().setAttribute("message","结算分类删除成功");
        GSOperatorBean tGSOperatorBean = (GSOperatorBean)aForm.getSession().getAttribute(GSBaseConstants.LOGIN);
        //将当前用户信息放入request中
        aForm.getRequest().setAttribute("curoperator",tGSOperatorBean);
        GSOrgProcessor tGSOrgProc = new GSOrgProcessor();
        aForm.getRequest().setAttribute("requery","true");
        aForm.getRequest().setAttribute("querymode","Q");
        return GSBaseConstants.FORWARD_SUCCESS;
    }

}
